﻿@{
    ViewBag.Title = "停车场列表";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using AFT.Parking.Entity;
@using AFT.Parking.Foundation;
@using AFT.Parking.WebSite.Common

@model IPagedList<Parking>
<div class="content-box">
    <!-- Start Content Box -->
    <div class="content-box-header">
        <h3>停车场列表</h3>

        <div class="clear"></div>
    </div>
    <form id="frm">
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">
                <!-- This is the target div. id must match the href of this div's tab -->
                <div class="notification attention png_bg">
                    名称：@Html.TextBox("name", null, new { @class = "searchBox" })
                    代理商：@Html.TextBox("agents", null, new { @class = "searchBox" })
                    <input type="submit" class="button" id="btnSubmit" value="查询" />
                </div>
                <table>
                    <thead>
                        <tr>
                            <th>名称</th>
                            <th>经纬度</th>
                            <th>地址</th>
                            <th>代理商</th>
                            <th>是否使用</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <td colspan="6">
                                <div class="pagination">
                                    @Html.Pager(Model)
                                </div>
                                <!-- End .pagination -->
                                <div class="clear"></div>
                            </td>
                        </tr>
                    </tfoot>
                    <tbody id="tBodyRows">
                        @foreach (var item in Model.Rows)
                        {
                            <tr id="@("tr"+item.Id)">
                                <td>
                                    @item.Name
                                </td>
                                <td>@item.LocationX - @item.LocationY</td>
                                <td>@item.Address</td>
                                <td>@item.Agents</td>
                                <td>@(item.IsEnable ? "正常" : "停用")</td>
                                <td>@item.CreatedOn.ToString("yyyy-MM-dd")</td>
                                <td>
                                    <a href="/parkingAreas/editeParking/@item.Id" title="Edit">编辑</a>
                                    <a href="/parkingAreas/areas?parkingId=@item.Id" target="_blank" title="Edit">查看停车区</a>
                                    <a href="/MallAreas/Floors?parkingId=@item.Id" target="_blank" title="Edit">查看商场</a>
                                    <a href="/parkingAreas/lifts?parkingId=@item.Id" target="_blank" title="add">查看电梯</a>
                                    <a href="/parkingCamera/CarsOfAreas?parkingsId=@item.Id">查看停车记录</a>
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
            <!-- End #tab1 -->
        </div>
        <!-- End .content-box-content -->
    </form>
</div>
